Skip to content

Add Drizzle Select benchmark #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Add Drizzle Select benchmark #2

wants to merge 8 commits into from

Conversation

rphlmr
Copy link

@rphlmr rphlmr commented Jul 24, 2024

👋 As we discussed on X, this PR adds Drizzle with select benchmarks.

I have also made some minor fixes.

You will notice that I have added two indexes.
I know you explained why, but it really matters for Drizzle Query API on large datasets.

While we strived for making the benchmark setup as realistic as possible, we had to take some tradeoffs in schema and queries. For example, we didn't add special indexes to the schema and sometimes used intentionally simplistic queries to be able to properly compare the higher-level APIs of each ORM.

I am open to rolling back this change (it also increases Prisma performance 🚀)

@nikolasburk
Copy link
Member

Hey @rphlmr, thanks so much for taking the time to create this PR, that's really appreciated! 🙏

The benchmarks in this repo specifically have been created to compare the performance of ORMs, i.e. higher-level APIs that abstract away from SQL.

Since your PR uses Drizzle's lower-level SQL query builder API, it doesn't really fit the comparison in this repo and would lead to an Apple-to-Orange comparison (this is similar reasoning that was used in the Drizzle benchmarks to not merge our improvement using a raw query).

That being said, we're planning to re-run the benchmarks again in a few months and will consider adding a comparison for the lower-level APIs of the ORMs as well, in which case we'd happily include your contribution!

We'll leave the PR open until then!

@rphlmr
Copy link
Author

rphlmr commented Jul 25, 2024

Thanks for the feedback 🙏

You are right!
Would you accept a separate PR with only indexes and connection warmup?

Do not hesitate to ping me back to update this PR once you are ready to integrate your new lower-level SQL API 👀

@nikolasburk
Copy link
Member

Would you accept a separate PR with only indexes and connection warmup?

Yes, these sound like useful improvements — thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants